package com.hopu.v1.service.admin.verify.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hopu.v1.pojo.common.PageData;
import com.hopu.v1.pojo.question.Questions;
import com.hopu.v1.pojo.question.QuestionsBanks;
import com.hopu.v1.service.admin.verify.VerifyQuestionsBanksService;
import com.hopu.v1.mapper.admin.verify.VerifyQuestionsBanksMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 *
 */
@Service
public class VerifyQuestionsBanksServiceImpl extends ServiceImpl<VerifyQuestionsBanksMapper, QuestionsBanks>
    implements VerifyQuestionsBanksService {

    @Resource
    private VerifyQuestionsBanksMapper verifyQuestionsBanksMapper;


    @Override
    public PageData<QuestionsBanks> selectAll(Integer currentPage, Integer pageSize) {
        List<QuestionsBanks> questionsBanks = verifyQuestionsBanksMapper.selectAll((currentPage-1)*pageSize, pageSize);
        Integer total = verifyQuestionsBanksMapper.selectAllCount();
        return new PageData<>(currentPage,pageSize,total,questionsBanks);
    }
}




